-
-
Notifications
You must be signed in to change notification settings - Fork 80
fix: fail gracefully on private non pro #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fail gracefully on private non pro #423
Conversation
Codecov Report
@@ Coverage Diff @@
## main #423 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 5 5
Branches 3 3
=========================================
Hits 5 5 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -275,7 +275,7 @@ try { | |||
let user; | |||
try { | |||
user = JSON.parse((await $`gh api user`).stdout).login; | |||
} catch (err) { | |||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, heh, this is unused... +1 to calling it error
over err
. I suppose we should enable https://eslint.org/docs/latest/rules/no-unused-vars#caughterrors... I'll file a separate issue to do that as a followup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯, this is excellent. Tried it out locally and it works great. Thanks @RNR1!
Returning false
makes sense to me - we can always rethink later if it gets more convoluted over time.
Note that I filed #425 around curly styles as a followup. I prefer brackets always for consistency. So I'll do that myself 😄
🎉 This is included in version v1.27.80 🎉 The release is available on: Cheers! 📦🚀 |
1 similar comment
🎉 This is included in version v1.27.80 🎉 The release is available on: Cheers! 📦🚀 |
@allcontributors add @RNR1 for design |
I've put up a pull request to add @RNR1! 🎉 |
Adds @RNR1 as a contributor for design. This was requested by JoshuaKGoldberg [in this comment](#423 (comment)) --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
PR Checklist
status: accepting prs
Overview
Fail gracefully for branch protection settings for private repos (non-Pro).
warnText
field to the "withSpinner" optionswithSpinner
will now store its callback return value, and will showwarnText
in case the value isfalse
Bonus: I changed all the
catch (err)
tocatch (error)
just for consistency (git blame on me)I'm honestly not so excited about this solution, but submitting it anyway to hear your thoughts